import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;

/**
 * Created with IntelliJ IDEA.
 * ClassName: Test
 * Package: PACKAGE_NAME
 * Description:
 * User: fzykd
 *
 * @Author: LQH
 * Date: 2023-12-25
 * Time: 20:28
 */

public class Test {

    static String LC_PAGE_PAGE = "\"page\":{";
    static String LC_PAGE_VALUE = "\"value\":\"";

    static String LC_PAGE_COLON = "\"";

    public static void main(String[] args) {

        String json = "{\"componentsMap\":[{\"package\":\"dtt-comps\",\"destructuring\":true,\"subName\":\"\",\"exportName\":\"FormInput\",\"main\":\"src/index.tsx\",\"componentName\":\"FormInput\",\"version\":\"0.2.619\"},{\"package\":\"dtt-comps\",\"destructuring\":true,\"subName\":\"\",\"exportName\":\"FormSelect\",\"main\":\"\",\"componentName\":\"FormSelect\",\"version\":\"0.2.619\"},{\"package\":\"dtt-comps\",\"destructuring\":true,\"subName\":\"\",\"exportName\":\"FormRadioGroup\",\"main\":\"\",\"componentName\":\"FormRadioGroup\",\"version\":\"0.2.619\"},{\"package\":\"dtt-comps\",\"destructuring\":true,\"subName\":\"\",\"exportName\":\"Filter\",\"main\":\"src/index.tsx\",\"componentName\":\"Filter\",\"version\":\"0.2.619\"},{\"package\":\"dtt-comps\",\"destructuring\":true,\"subName\":\"\",\"exportName\":\"LceTableList\",\"main\":\"src/index.js\",\"componentName\":\"LceTableList\",\"version\":\"0.2.619\"},{\"package\":\"dtt-comps\",\"destructuring\":true,\"subName\":\"\",\"exportName\":\"ProCard\",\"main\":\"src/index.js\",\"componentName\":\"ProCard\",\"title\":\"卡片\",\"version\":\"0.2.619\"},{\"devMode\":\"lowCode\",\"componentName\":\"Page\"}],\"componentsTree\":[{\"fileName\":\"/\",\"css\":\"body {\\n  font-size: 12px;\\n}\\n\\n.button {\\n  width: 100px;\\n  color: #ff00ff\\n}\",\"hidden\":false,\"docId\":\"docl4r2tv5a\",\"methods\":{\"formatParams\":{\"type\":\"JSFunction\",\"value\":\"function formatParams(params) {\\n  return params;\\n}\"},\"onFirstRequest\":{\"type\":\"JSFunction\",\"value\":\"function onFirstRequest() {\\n  return this.constants.params;\\n}\"}},\"conditionGroup\":\"\",\"title\":\"\",\"props\":{\"ref\":\"outerView\",\"style\":{\"height\":\"100%\"}},\"lifeCycles\":{\"constructor\":{\"type\":\"JSFunction\",\"value\":\"function constructor(props) {\\n  this.state = {\\n    pageParams: this.constants\\n  };\\n  this.formatParams = this.formatParams.bind(this);\\n}\"},\"componentDidMount\":{\"type\":\"JSFunction\",\"value\":\"function componentDidMount() {\\n  console.log('账套关联公司分页', this.constants);\\n}\"}},\"condition\":true,\"children\":[{\"condition\":true,\"hidden\":false,\"children\":[{\"condition\":true,\"hidden\":false,\"children\":[{\"condition\":true,\"hidden\":false,\"children\":[{\"condition\":true,\"hidden\":false,\"isLocked\":false,\"conditionGroup\":\"\",\"componentName\":\"FormInput\",\"id\":\"node_ocl6xg67hl4\",\"title\":\"\",\"props\":{\"size\":\"medium\",\"placeholder\":\"请输入\",\"formItemProps\":{\"columnSpan\":1,\"fullWidth\":true,\"size\":\"medium\",\"name\":\"LEDGER_NAME\",\"label\":\"账套名称\",\"device\":\"desktop\",\"required\":false,\"primaryKey\":\"1959\"}}},{\"condition\":true,\"hidden\":false,\"isLocked\":false,\"conditionGroup\":\"\",\"componentName\":\"FormSelect\",\"id\":\"node_ocl6xg67hl5\",\"title\":\"\",\"props\":{\"mode\":\"single\",\"hasArrow\":true,\"hasClear\":true,\"showSearch\":true,\"placeholder\":\"请选择\",\"api\":{\"failFunction\":\"function(err) {}\",\"apiName\":\"币种列表查询接口\",\"postUri\":\"http://10.81.128.35:9090/expense/commonDatas/currencies\",\"modifiedUser\":\"xyportal\",\"supCors\":1,\"waitTimeout\":10000,\"postHeader\":\"{\\r\\n      \\\"Accept\\\": \\\"application/json\\\",\\r\\n      \\\"Content-Type\\\": \\\"application/json\\\"\\r\\n    }\",\"postParams\":\"{\\r\\n  \\\"data\\\": {},\\r\\n  \\\"lang\\\": \\\"cn\\\",\\r\\n  \\\"operator\\\": \\\"\\\",\\r\\n  \\\"sid\\\": \\\"\\\",\\r\\n  \\\"source\\\": \\\"PC\\\",\\r\\n  \\\"version\\\": \\\"1\\\"\\r\\n}\",\"postMethod\":\"POST\",\"countFunction\":\" function(params, systemParams) {\\r\\n   console.info(\\\"#####\\\",params);\\r\\n   return true \\r\\n }\",\"appId\":\"006520697139097600\",\"successFunction\":\"function(res) {\\r\\n return res.data\\r\\n }\",\"modifiedDate\":\"2022-08-17 14:20:36\",\"createUser\":\"965653423602507776\",\"apiId\":\"1559357653908103169\",\"beforeFunction\":\" function(params, systemParams) {\\r\\n   return params \\r\\n }\",\"createDate\":\"2022-08-16 09:53:31\"},\"valueKey\":\"currencyCode\",\"labelKey\":\"currencyCode\",\"formItemProps\":{\"columnSpan\":1,\"fullWidth\":true,\"size\":\"medium\",\"name\":\"CURRENCY_CODE\",\"label\":\"币种\",\"device\":\"desktop\",\"required\":false}}},{\"condition\":true,\"hidden\":false,\"isLocked\":false,\"conditionGroup\":\"\",\"componentName\":\"FormRadioGroup\",\"id\":\"node_ocl6xg67hl6\",\"title\":\"\",\"props\":{\"itemDirection\":\"hoz\",\"shape\":\"normal\",\"isPreview\":false,\"defaultValue\":\"是\",\"disabled\":false,\"placeholder\":\"请输入\",\"dataSource\":[{\"label\":\"是\",\"value\":\"是\"},{\"label\":\"否\",\"value\":\"否\"}],\"formItemProps\":{\"columnSpan\":1,\"fullWidth\":true,\"size\":\"medium\",\"name\":\"ACTIVE_FLAG\",\"label\":\"是否启用\",\"device\":\"desktop\",\"required\":false,\"primaryKey\":\"6726\"}}}],\"docId\":\"docl6psm9kh\",\"isLocked\":false,\"conditionGroup\":\"\",\"componentName\":\"Filter\",\"id\":\"node_ocl6psm9kh37\",\"title\":\"\",\"props\":{\"operations\":[],\"operationConfig\":{\"visibleButtonCount\":3},\"labelAlign\":\"left\",\"labelCol,fixedSpan\":6,\"labelCol\":{\"fixedSpan\":6},\"cols\":3}}],\"docId\":\"docl6psm9kh\",\"isLocked\":false,\"conditionGroup\":\"\",\"componentName\":\"LceTableList\",\"id\":\"node_ocl6psm9kh36\",\"title\":\"\",\"props\":{\"borderColor\":\"#E0E0E0\",\"hasTableBorder\":true,\"log\":false,\"columns\":[{\"hidden\":true,\"dataIndex\":\"LINE_ID\",\"startAuth\":false,\"width\":200,\"title\":\"LINE_ID\",\"formatType\":\"text\"},{\"hidden\":true,\"languages\":[{\"label\":\"账套ID\",\"value\":{\"deep\":0,\"label\":\"中文\",\"value\":\"zh-CN\"}},{\"label\":\"Account ID\",\"value\":{\"deep\":0,\"label\":\"English\",\"value\":\"en-US\"}}],\"dataIndex\":\"LEDGER_ID\",\"startAuth\":false,\"width\":200,\"title\":\"账套ID\",\"formatType\":\"text\"},{\"languages\":[{\"label\":\"账套名称\",\"value\":{\"deep\":0,\"label\":\"中文\",\"value\":\"zh-CN\"}},{\"label\":\"Ledger Name\",\"value\":{\"deep\":0,\"label\":\"English\",\"value\":\"en-US\"}}],\"dataIndex\":\"LEDGER_NAME\",\"width\":200,\"title\":\"账套名称\",\"formatType\":\"text\"},{\"languages\":[{\"label\":\"公司名称\",\"value\":{\"deep\":0,\"label\":\"中文\",\"value\":\"zh-CN\"}},{\"label\":\"Company\",\"value\":{\"deep\":0,\"label\":\"English\",\"value\":\"en-US\"}}],\"dataIndex\":\"ORGANIZATION_NAME_LANG\",\"width\":200,\"title\":\"公司名称\",\"formatType\":\"text\"},{\"languages\":[{\"label\":\"公司编码\",\"value\":{\"deep\":0,\"label\":\"中文\",\"value\":\"zh-CN\"}},{\"label\":\"Company ID\",\"value\":{\"deep\":0,\"label\":\"English\",\"value\":\"en-US\"}}],\"dataIndex\":\"ORGANIZATION_CODE\",\"width\":200,\"title\":\"公司编码\",\"formatType\":\"text\"},{\"hidden\":true,\"languages\":[{\"label\":\"公司ID\",\"value\":{\"deep\":0,\"label\":\"中文\",\"value\":\"zh-CN\"}},{\"label\":\"Company ID\",\"value\":{\"deep\":0,\"label\":\"English\",\"value\":\"en-US\"}}],\"dataIndex\":\"ORGANIZATION_ID\",\"startAuth\":false,\"width\":200,\"title\":\"公司ID\",\"formatType\":\"text\"}],\"actionColumnProps\":{\"languages\":[{\"label\":\"操作\",\"value\":{\"deep\":0,\"label\":\"中文\",\"value\":\"zh-CN\"}},{\"label\":\"Operate\",\"value\":{\"deep\":0,\"label\":\"English\",\"value\":\"en-US\"}}],\"width\":200,\"lock\":\"right\",\"title\":\"操作\"},\"isLazyLoading\":false,\"className\":\"\",\"paginationProps\":{\"current\":1,\"hidden\":false,\"size\":\"medium\",\"pageSize\":20},\"headerTitleColor\":\"#666666\",\"database\":{\"deep\":0,\"label\":\"bdh-portal-test\",\"value\":\"4\"},\"hideTable\":false,\"fixedHeader\":false,\"constants\":{\"type\":\"JSExpression\",\"value\":\"this.constants\"},\"hasBorder\":false,\"api\":{\"failFunction\":\"function(err) {}\",\"apiName\":\"账套分页\",\"postUri\":\"/business/crud/page\",\"modifiedUser\":\"xyportal\",\"supCors\":1,\"waitTimeout\":10000,\"postHeader\":\"{\\r\\n      \\\"Accept\\\": \\\"application/json\\\",\\r\\n      \\\"Content-Type\\\": \\\"application/json\\\"\\r\\n    }\",\"postParams\":\"{}\",\"postMethod\":\"POST\",\"countFunction\":\"/**\\r\\n params: 请求参数 \\r\\n systemParams: 系统参数 \\r\\n 返回true发起请求 \\r\\n*/ \\r\\n function(params, systemParams) {\\r\\n   return true \\r\\n }\",\"appId\":\"006520697139097600\",\"successFunction\":\"function(res) {\\r\\n  return res.data\\r\\n }\",\"modifiedDate\":\"2022-08-18 00:21:07\",\"createUser\":\"xyportal\",\"apiId\":\"1559938383230967809\",\"beforeFunction\":\"/**\\r\\n params: 请求参数 \\r\\n systemParams: 系统参数 \\r\\n*/ \\r\\n function(params, systemParams) {\\r\\n   \\r\\n   return {\\r\\n     ...params,\\r\\n     \\\"data\\\": {\\r\\n       \\\"@lc_datasource\\\": \\\"4\\\",\\r\\n       \\\"[]\\\": {\\r\\n         \\\"Mdm_ledger_organization\\\": {\\r\\n           \\\"@index\\\":1,\\r\\n           \\\"LEDGER_ID\\\": systemParams.searchParam.rowRecord.BUSINESS_ID,\\r\\n           \\\"@column\\\": \\\"LEDGER_ID,ORGANIZATION_ID,BUSINESS_ID:LINE_ID\\\",\\r\\n           \\\"@order\\\": \\\"MODIFIED_DATE-\\\"\\r\\n         },\\r\\n         \\\"MDM_ledger\\\": {\\r\\n           \\\"@index\\\": 2,\\r\\n           \\\"@column\\\": \\\"LEDGER_NAME,BUSINESS_ID\\\",\\r\\n           \\\"BUSINESS_ID@\\\": \\\"/Mdm_ledger_organization/LEDGER_ID\\\"\\r\\n         },\\r\\n         \\\"MDM_organization\\\": {\\r\\n           \\\"@index\\\": 3,\\r\\n           \\\"@column\\\": \\\"ORGANIZATION_NAME,ORGANIZATION_CODE,BUSINESS_ID\\\",\\r\\n           \\\"BUSINESS_ID@\\\": \\\"/Mdm_ledger_organization/ORGANIZATION_ID\\\"\\r\\n         }\\r\\n       }\\r\\n     },\\r\\n     \\\"page\\\": systemParams.pageInfo.page,\\r\\n     \\\"size\\\": systemParams.pageInfo.size,\\r\\n     \\\"operator\\\": systemParams.operator,\\r\\n     \\\"appId\\\": systemParams.appId\\r\\n   }\\r\\n }\",\"createDate\":\"2022-08-18 00:21:07\"},\"formatParams\":{\"type\":\"JSFunction\",\"value\":\"function(){this.formatParams.apply(this,Array.prototype.slice.call(arguments).concat([])) }\"},\"enableFormat\":true,\"summary\":{\"languages\":[{\"label\":\"总计\",\"value\":\"zh-CN\"},{\"label\":\"Total\",\"value\":\"en-US\"}]},\"actionBarButtons\":{\"visibleButtonCount\":3,\"dataSource\":[{\"actionType\":\"create\",\"pageType\":\"dialog\",\"reload\":\"true\",\"languages\":[{\"label\":\"新增\",\"value\":{\"deep\":0,\"label\":\"中文\",\"value\":\"zh-CN\"}},{\"label\":\"New\",\"value\":{\"deep\":0,\"label\":\"English\",\"value\":\"en-US\"}}],\"size\":14,\"children\":\"新增\",\"hint\":\"icon-xinzeng\",\"dialogTitle\":[{\"label\":\"公司映射新增\",\"value\":{\"deep\":0,\"label\":\"中文\",\"value\":\"zh-CN\"}},{\"label\":\"New company Mapping\",\"value\":{\"deep\":0,\"label\":\"English\",\"value\":\"en-US\"}}],\"page\":{\"deep\":0,\"label\":\"公司映射新增\",\"value\":\"009850135914344448\"},\"id\":\"entryl8114frj\",\"type\":\"primary\"}]},\"hasHeader\":true,\"actionColumnButtons\":{\"visibleButtonCount\":3,\"text\":true,\"dataSource\":[{\"actionType\":\"edit\",\"pageType\":\"dialog\",\"reload\":\"true\",\"languages\":[{\"label\":\"编辑\",\"value\":{\"deep\":0,\"label\":\"中文\",\"value\":\"zh-CN\"}},{\"label\":\"Edit\",\"value\":{\"deep\":0,\"label\":\"English\",\"value\":\"en-US\"}}],\"size\":14,\"children\":\"编辑\",\"log\":false,\"hint\":\"icon-bianji\",\"dialogTitle\":[{\"label\":\"公司映射编辑\",\"value\":{\"deep\":0,\"label\":\"中文\",\"value\":\"zh-CN\"}}],\"page\":{\"deep\":0,\"label\":\"公司映射编辑\",\"value\":\"009850135914344449\"},\"id\":\"entryl8114fqa\",\"type\":\"primary\"},{\"actionType\":\"del\",\"pageType\":\"dialog\",\"reload\":\"true\",\"languages\":[{\"label\":\"删除\",\"value\":{\"deep\":0,\"label\":\"中文\",\"value\":\"zh-CN\"}},{\"label\":\"Delete\",\"value\":{\"deep\":0,\"label\":\"English\",\"value\":\"en-US\"}}],\"size\":14,\"children\":\"删除\",\"log\":false,\"hint\":\"icon-shanchuicon\",\"warning\":true,\"api\":{\"failFunction\":\"function(err) {}\",\"apiName\":\"通用删除\",\"postUri\":\"/business/crud/delete\",\"modifiedUser\":\"xyportal\",\"supCors\":1,\"waitTimeout\":10000,\"postHeader\":\"{\\r\\n      \\\"Accept\\\": \\\"application/json\\\",\\r\\n      \\\"Content-Type\\\": \\\"application/json\\\"\\r\\n    }\",\"postParams\":\"{}\",\"postMethod\":\"POST\",\"countFunction\":\" function(params, systemParams) {\\r\\n   return true \\r\\n }\",\"appId\":\"006520697139097600\",\"successFunction\":\"function(res) {\\r\\n return res \\r\\n }\",\"modifiedDate\":\"2022-08-18 16:46:41\",\"createUser\":\"xyportal\",\"apiId\":\"1559792408780775426\",\"beforeFunction\":\"/**\\r\\n params: 请求参数 \\r\\n systemParams: 系统参数 \\r\\n*/\\r\\nfunction(params, systemParams) {\\r\\n  console.log(777, params);\\r\\n  return {\\r\\n    ...params,\\r\\n    \\\"data\\\": {\\r\\n      \\\"@lc_datasource\\\": \\\"4\\\", \\r\\n      \\\"MDM_LEDGER_ORGANIZATION\\\": { \\r\\n        \\\"BUSINESS_ID\\\": systemParams.delParam.rowKeys[0]\\r\\n      },\\r\\n      \\\"tag\\\": \\\"MDM_LEDGER_ORGANIZATION\\\"\\r\\n    },\\r\\n    \\\"operator\\\": systemParams.operator,\\r\\n    \\\"appId\\\": systemParams.appId\\r\\n  }\\r\\n}\",\"createDate\":\"2022-08-17 14:41:04\"},\"id\":\"entryl8zaulf7\",\"type\":\"secondary\"}]},\"onFirstRequest\":{\"type\":\"JSFunction\",\"value\":\"function(){this.onFirstRequest.apply(this,Array.prototype.slice.call(arguments).concat([])) }\"},\"tableModel\":{\"deep\":0,\"label\":\"mdm_ledger\",\"value\":\"mdm_ledger\"},\"chosedMode\":\"multiple\",\"history\":{\"type\":\"JSExpression\",\"value\":\"this.history\"},\"filter\":false,\"isZebra\":false,\"headerBg\":\"#F3F3F3\",\"size\":\"medium\",\"sourceType\":\"api\",\"indexColumn\":true,\"dataSource\":[],\"__events\":{\"eventList\":[{\"name\":\"onFirstRequest\",\"disabled\":true},{\"name\":\"formatParams\",\"disabled\":true}],\"eventDataList\":[{\"name\":\"onFirstRequest\",\"type\":\"componentEvent\",\"relatedEventName\":\"onFirstRequest\"},{\"name\":\"formatParams\",\"type\":\"componentEvent\",\"relatedEventName\":\"formatParams\"}]},\"settingButtons\":true,\"primaryKey\":\"LINE_ID\"}}],\"isLocked\":false,\"conditionGroup\":\"\",\"componentName\":\"ProCard\",\"id\":\"node_ocl8zinv5m2f\",\"title\":\"\",\"props\":{\"hasDivider\":true,\"bodyPadding\":\"0\",\"title\":\"\",\"align\":\"left\",\"loading\":false,\"isFillContainer\":true}}],\"isLocked\":false,\"originCode\":\"class LowcodeComponent extends Component {\\n  state = {\\n    \\\"text\\\": \\\"outer\\\",\\n    \\\"isShowDialog\\\": false\\n  }\\n  constructor(props) {\\n    this.state = { pageParams: this.constants };\\n    this.formatParams = this.formatParams.bind(this);\\n\\n  }\\n\\n  componentDidMount() {\\n    console.log('账套关联公司分页', this.constants);\\n  }\\n\\n\\tonFirstRequest(){\\n    return this.constants.params;\\n\\t}\\n\\n  formatParams(params){\\n    return params;\\n  }\\n}\",\"componentName\":\"Page\",\"id\":\"node_dockcviv8fo1\",\"state\":{\"isShowDialog\":{\"type\":\"JSExpression\",\"value\":\"false\"},\"text\":{\"type\":\"JSExpression\",\"value\":\"\\\"outer\\\"\"}},\"dataSource\":{\"list\":[{\"shouldFetch\":{\"type\":\"JSFunction\",\"value\":\"function() { \\n  console.log('should fetch.....');\\n  return true; \\n}\"},\"options\":{\"headers\":{},\"method\":\"GET\",\"isCors\":true,\"params\":{},\"uri\":\"mock/info.json\",\"timeout\":5000},\"id\":\"info\",\"type\":\"fetch\",\"isInit\":true}]}}],\"version\":\"1.0.0\",\"i18n\":{}}";


        int a = json.indexOf(LC_PAGE_PAGE);
//        while (a > 0) {
        int b = json.indexOf(LC_PAGE_VALUE, a);
        System.out.println(b);
        int start = b + 9;
        int end = json.indexOf(LC_PAGE_COLON, start);
        String id = json.substring(9049, 9067);
//            a = json.indexOf(LC_PAGE_PAGE, end);

        System.out.println(id);
//        }


    }
}
